import axios from 'axios'
import Vue from 'vue'
import taxios from '@/concise/modules/axios.js'
import tz from '@/concise/modules/router.js'
/* 未装qs，如果post后台接收不到用qs转换传输 */
axios.defaults.baseURL = '/api'
    /* 配置请求头 */
// axios.defaults.headers.post['Content-type'] = 'application/x-www-form-urlencoded'
axios.defaults.headers.get['Content-type'] = 'application/x-www-form-urlencoded'
axios.defaults.headers.get['X-Requested-With'] = 'xmlhttprequest'
axios.defaults.headers.post['Content-Type'] = 'application/json'
axios.interceptors.request.use(config => {
    // config.headers.common.token = localStorage.getItem('token')
    return config
})
export default {
    taxios
}
/* 配置请求头 */
Vue.prototype.$task = taxios
Vue.prototype.$troute = tz